<template>
  <ant-modal modalWidth="1000" modalHeight="600" :visible="open" :modal-title="formTitle" :adjust-size="true" :maskClosable="false"
    @cancel="cancel">
    <a-form-model ref="form" :model="form" :rules="rules" slot="content" layout="vertical">
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-model-item label="对账单号">
            <a-input v-model="form.accountCode" readOnly />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="收款单号">
            <a-input v-model="form.payCode" readOnly />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="客户">
            <a-input v-model="form.customerName" readOnly />
          </a-form-model-item>
        </a-col>
        <!-- <a-col :span="12">
          <a-form-model-item label="应收金额">
            <a-input v-model="form.hasAmount"  readOnly />
          </a-form-model-item>
        </a-col> -->
        <a-col :span="12">
          <a-form-model-item label="收款金额">
            <a-input v-model="form.payAmount"  readOnly/>
          </a-form-model-item>
        </a-col>
        <!-- <a-col :span="12">
          <a-form-model-item label="抹零金额">
            <a-input v-model="form.zeroAmount"  readOnly/>
          </a-form-model-item>
        </a-col> -->
        <a-col :span="12">
          <a-form-model-item label="收款日期">
            <a-input v-model="form.payDate"  readOnly/>
          </a-form-model-item>
        </a-col>
        <!-- <a-col :span="12">
          <a-form-model-item label="收款账户" prop="payAccount">
            <a-input v-model="form.payAccount"  readOnly/>
          </a-form-model-item>
        </a-col> -->
        <a-col :span="12">
          <a-form-model-item label="备注" prop="remark">
            <a-input v-model="form.remark"  readOnly/>
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="24">
          <a-card :bordered="false">
            <advance-table :loading="loading" rowKey="id" size="middle" :columns="columns2" :data-source="form.paymentDetailList"
              :pagination="false" :bordered="true">
              <div class="table-operations" slot="button" style='margin-bottom:0px;'>
                <div class="table_title">账户列表</div>
              </div>
            </advance-table>
          </a-card>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="24">
          <a-card :bordered="false">
            <advance-table :loading="loading" rowKey="id" size="middle" :columns="columns1" :data-source="form.paymentBillList"
              :pagination="false" :bordered="true">
              <div class="table-operations" slot="button" style='margin-bottom:0px;'>
                <div class="table_title">对账明细</div>
              </div>
              <span slot="nopaySlot" slot-scope="{record}">
                {{ record.totalAmount - record.collectedAmount }}
              </span>
            </advance-table>
          </a-card>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button :disabled="disabled" @click="cancel">
        取消
      </a-button>
    </template>
  </ant-modal>
</template>
<script>
import BizPaymentForm from './BizPaymentForm'
export default {
  ...BizPaymentForm
}
</script>
<style lang="less" scoped>
.table-operations,
body tr.ant-table-expanded-row:hover .table-operations {
  padding-bottom: 8px;
  text-align: right;
}

.table-operations {
  margin-bottom: 16px;
}

.table-operations>button,
.table-operations .ant-input-affix-wrapper {
  margin-right: 8px;
}

.table_title {
  float: left;
  padding-left: 8px;
  font-weight: 600;
  color: #222222;
  line-height: 30px;
}
</style>
